<!doctype html>
<html>
<head>
    <title>达人资料编辑</title>
    <?php $this->load->module('admin/index/page_header');?>
    <!--引入CSS-->
    <link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/public/Lib/webuploader/webuploader.css">
    <!--引入JS-->
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/webuploader/webuploader.js"></script>
</head>
<body>
<div class="wrap">
    <div id="home_toptip"></div>

    <div class="nav">
        <ul>
            <li><a href="javascript:window.history.go(-1);">返回</a></li>
            <li class="current"><a>编辑微名片 - <?php echo $id ;?></a></li>
        </ul>
    </div>
    <div class="table_full">
        <form class="formvalidate" action="<?php echo $form_url;?>" method="post">
            <div class="h_a">微名片信息 - <?php echo $id ;?></div>
            <div class="table_full">
                <table width="100%">
                    <col class="th" />
                    <col/>
                    <?php if(SITEID == 42 || SITEID == 751){?>
                    <tr>
                        <th>一级微名片</th>
                        <td>
                            <select name="Form[pid]">
                                <option value="0">无</option>
                                <?php foreach ($select as $v) {
                                    echo '<option value="'.$v['id'].'" '.($pid == $v['id'] ? 'selected':'').'>'.($v['realname'] ? $v['realname'] : $v['name']).'</option>';
                                }
                                ?>
                            </select>
                        </td>
                    </tr>
                    <?PHP }?>
                    <tr>
                        <th>头像</th>
                        <td class="rowform">
                            <li><img height="120" id="avatar_box" src="<?php echo URLPIC.$avatar ;?>" onerror="this.error=null;this.src='<?php echo site_url('static/public/images/nophoto.jpg')?>'"><span><span></li><span style="color:red">[尺寸：300x200]</span>
                        </td>
                    </tr>
                    <tr>
                        <th>修改头像</th>
                        <td class="rowform">
                            <li><span id="filePicker">修改头像</span></li>
                        </td>
                    </tr>
                    <tr>
                        <th>个人风采</th>
                        <td class="rowform">
                            <li><img height="250" id="appearance_box" onerror="this.error=null;this.src='<?php echo site_url('static/public/images/nophoto.jpg')?>'" src="<?php echo URLPIC.$appearance ;?>"><span><span></li><span style="color:red">[尺寸：800x600]</span>
                        </td>
                    </tr>
                    <tr>
                        <th>修改风采</th>
                        <td class="rowform">
                            <li><span id="appearancePicker">修改风采</span></li>
                        </td>
                    </tr>
                    <tr>
                        <th>导游证</th>
                        <td class="rowform">
                            <li><img height="250" id="guide_box" onerror="this.error=null;this.src='<?php echo site_url('static/public/images/nophoto.jpg')?>'" src="<?php echo URLPIC.$guide ;?>"><span><span></li><span style="color:red">[尺寸：800x600]</span>
                        </td>
                    </tr>
                    <tr>
                        <th>上传导游证</th>
                        <td class="rowform">
                            <li><span id="guidePicker">上传导游证</span></li>
                        </td>
                    </tr>
                    <tr>
                        <th>微名片上首页推荐线路</th>
                        <td class="rowform">
                            <textarea class="length_5" name="Form[lines]"><?php if(!empty($lines)) echo $lines ;?></textarea>
                            <p class="fun_tips" style="color:orangered">此项填写推荐的线路编号，如：zb0000358、1418367131_80542 等。
                            <br>填写后这些线路会被推送到自己的微名片首页上-<strong>热门线路</strong>。
                                <br>多个线路编号 用逗号“，”隔开。
                            </p>
                        </td>
                    </tr>
                    <tr>
                        <th>微名片上公司名称</th>
                        <td class="rowform">
                            <input name="Form[expert_company]"  value="<?php if(!empty($expert_company)) echo $expert_company;?>" class="input input_hd length_5" />
                            <p class="fun_tips" style="color:orangered">显示在微名片的头像和电话下方</p>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="h_a">基本资料</div>
            <div class="table_full">
                <table width="100%">
                    <col class="th" />
                    <col/>
                    <tr>
                        <th>真实姓名</th>
                        <td><input name="Form[realname]" type="text" class="input input_hd length_5" value="<?php if(!empty($realname)) echo $realname; ?>" validate="{required:true,rangelength:[2,30]}"></td>
                    </tr>
                    <tr>
                        <th>性别</th>
                        <td>
                            <select name="Form[gender]" class="select_5">
                                <option value="2" <?php if(!empty($gender)&&$gender=='2'):?>selected<?php endif;?>>女</option>
                                <option value="1" <?php if(!empty($gender)&&$gender=='1'):?>selected<?php endif;?>>男</option>
                                <select>
                        </td>
                    </tr>

                    <tr>
                        <th>服务专长</th>
                        <td>
                            <textarea class="length_5" name="Form[speciality]" validate="{required:true}"><?php if(!empty($speciality)) echo $speciality ;?></textarea>
                        </td>
                    </tr>

                    <tr>
                        <th>服务年限</th>


                        <td>
                            <select name="Form[term]" class="select_5"  validate="{required:true}">
                                <option value="1" <?php if(!empty($term)&&$term=='1'):?>selected<?php endif;?>>1年</option>
                                <option value="2" <?php if(!empty($term)&&$term=='2'):?>selected<?php endif;?>>2年</option>
                                <option value="3" <?php if(!empty($term)&&$term=='3'):?>selected<?php endif;?>>3-4年</option>
                                <option value="4" <?php if(!empty($term)&&$term=='4'):?>selected<?php endif;?>>5-7年</option>
                                <option value="5" <?php if(!empty($term)&&$term=='5'):?>selected<?php endif;?>>8-9年</option>
                                <option value="6" <?php if(!empty($term)&&$term=='6'):?>selected<?php endif;?>>10年以上</option>
                            <select>
                        </td>


                    </tr>
                    <tr>
                        <th>星级</th>
                        <td>
                            <select name="Form[stars]" class="select_5"  validate="{required:true}">
                                <option value="1" <?php if(!empty($stars)&&$stars=='1'):?>selected<?php endif;?>>一星级</option>
                                <option value="2" <?php if(!empty($stars)&&$stars=='2'):?>selected<?php endif;?>>二星级</option>
                                <option value="3" <?php if(!empty($stars)&&$stars=='3'):?>selected<?php endif;?>>三星级</option>
                                <option value="4" <?php if(!empty($stars)&&$stars=='4'):?>selected<?php endif;?>>四星级</option>
                                <option value="5" <?php if(!empty($stars)&&$stars=='5'):?>selected<?php endif;?>>五星级</option>
                                <select>
                        </td>
                    </tr>
                    <tr>
                        <th>推荐</th>
                        <td>
                            <select name="Form[is_recommend]" class="select_5"  validate="{required:true}">
                                <option value="1" <?php if(!empty($is_recommend)&&$is_recommend=='1'):?>selected<?php endif;?>>推荐</option>
                                <option value="0" <?php if(!empty($is_recommend)&&$is_recommend=='0'):?>selected<?php endif;?>>不推荐</option>
                            <select>
                        </td>
                    </tr>
                    <tr>
                        <th>服务费/天</th>
                        <td><input name="Form[charge]" type="text" class="input input_hd length_5" value="<?php if(!empty($charge)) echo $charge; ?>" validate="{rangelength:[0,4],number:true}"></td>
                    </tr>
                    <tr>
                        <th>自我简介</th>
                        <td>
                            <textarea class="length_5" name="Form[profile]" validate="{required:true}"><?php if(!empty($profile)) echo $profile ;?></textarea>
                        </td>
                    </tr>
                    <tr>
                        <th>门店地址</th>
                        <td><input name="Form[addr]" type="text" validate="{required:true}" class="input input_hd length_5" value="<?php if(!empty($addr)) echo $addr; ?>"></td>
                    </tr>
                </table>
            </div>

            <div class="h_a">联系信息</div>
            <div class="table_full">
                <table width="100%">
                    <col class="th" />
                    <col/>


                    <tr>
                        <th>QQ</th>
                        <td>
                            <input name="Form[qq]" type="text" class="input length_5" value="<?php if(!empty($qq)) echo $qq;?>">
                        </td>
                    </tr>
                    <tr>
                        <th>固定电话</th>
                        <td>
                            <input name="Form[telephone]" type="text" class="input length_5" value="<?php if(!empty($telephone)) echo $telephone;?>">
                        </td>
                    </tr>
                </table>
            </div>


            <div class="h_a">银行卡信息（用于佣金提现）</div>
            <div class="table_full">
                <table width="100%">
                    <col class="th" />
                    <col/>

                    <tr>
                        <th>银行名称</th>
                        <td>
                            <input name="Card[bank]" type="text" class="input length_5" value="<?php echo $card_info['bank']?>">
                        </td>
                    </tr>
                    <tr>
                        <th>开户行</th>
                        <td>
                            <input name="Card[bank_info]" type="text" class="input length_5" value="<?php echo $card_info['bank_info']?>">
                        </td>
                    </tr>
                    <tr>
                        <th>持卡人姓名</th>
                        <td>
                            <input name="Card[card_name]" type="text" class="input length_5" value="<?php echo $card_info['card_name']?>">
                        </td>
                    </tr>
                    <tr>
                        <th>卡号</th>
                        <td>
                            <input name="Card[card_number]" type="text" class="input length_5" value="<?php echo $card_info['card_number']?>">
                        </td>
                    </tr>
                </table>
            </div>


            <div class="btn_wrap">
                <div class="btn_wrap_pd">
                    <button type="submit" class="btn btn_submit J_ajax_submit_btn">提交<tton>
                </div>
            </div>
            <input type="hidden" name="id" value="<?php echo $id ;?>"/>
        </form>



    </div>
</div>
<script type="text/javascript">
    upload_image_2("<?php echo site_url('expert/admin/upload_avatar/?id='.$id);?>",'filePicker','face_image','avatar_box');
    upload_image_2("<?php echo site_url('expert/admin/upload_appearance/?id='.$id);?>",'appearancePicker','face_image','appearance_box');
    upload_image_2("<?php echo site_url('expert/admin/upload_guide/?id='.$id);?>",'guidePicker','face_image','guide_box');
</script>
</body>
</html>